<%@ page import="com.ld.manageBook.service.BorrowService" %>
<%@ page import="com.ld.manageBook.service.impl.BorrowImpl" %>
<%@ page import="com.ld.manageBook.bean.Borrow" %>
<%@ page import="com.ld.manageBook.service.BookService" %>
<%@ page import="com.ld.manageBook.service.impl.BookServiceImpl" %>
<%@ page import="com.ld.manageBook.bean.Books" %><%--
  Created by IntelliJ IDEA.
  User: 刘邓
  Date: 2023-06-03
  Time: 9:52
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>还书界面展示</title>
</head>
<body>
<%!
    private BorrowService borrowService = new BorrowImpl();
	private BookService bookService = new BookServiceImpl();
%>
<%
    Integer id = Integer.parseInt(request.getParameter("id"));
    Borrow borrow = borrowService.getBorrowById(id);
    Books book = bookService.getBookById(borrow.getBook_id());
	session.setAttribute("currentBorrow",borrow);
%>
<form action="/home/returnBookOutcome.jsp" method="get">
    书名:<input name="book_name" placeholder="<%=book.getName()%>" disabled><br>
    借阅量:<input name="number" placeholder="<%=borrow.getNumber()%>" disabled><br>
    需还量:<input name="needreturn" placeholder="<%=borrow.getNeedreturn()%>"><br>
    还书量:<input name="returnNumber"><br>
    <input type="submit" value="还书">
</form>
</body>
</html>
